#ifndef _jobthread_h__
#define _jobthread_h__
#include "system/thread.h"
#include "system/threadevent.h"

namespace gecko
{

	class JobManager;
	class Job;

	class JobThread : public IThread
	{
	public:
		// constructor
		JobThread(JobManager * jobManager);

		// give the thread a job
		void SetCurrentJob(Job * job);

		// stop the thread processing
		void KillProcessing();

	protected:
		// Process function.
		void Process();

	private:
		Job * m_currentJob;
		JobManager * m_jobManager;
		ThreadEvent m_threadEvent;
		bool m_run;
	};

}

#endif // #ifndef _jobthread_h__